package com.moefor.clover.init.config;

import java.util.ArrayList;
import java.util.List;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.MediaType;

import com.alibaba.fastjson.support.spring.FastJsonHttpMessageConverter4;
@Configuration
public class FastJsonConfig {
	@Bean(name = "FastJsonMessageConverter")
	public FastJsonHttpMessageConverter4 fastJsonHttpMessageConverter() {
		// TODO Auto-generated method stub
		FastJsonHttpMessageConverter4 messageConverter = new FastJsonHttpMessageConverter4();
		List<MediaType> supportedMediaTypes = new ArrayList<MediaType>();
		supportedMediaTypes.add(MediaType.APPLICATION_JSON);
		messageConverter.setSupportedMediaTypes(supportedMediaTypes);
		return messageConverter;
	}
}
